/**
 * getPicture 
 * @description 显示图片js
 * @Author dinghao
 * @Date 2024-01-01
 * VUE 2.0
 */

import sysConfig from '@/common/config/config.js'

//const picBase = sysConfig.congifService.ossUrl

export function getPicture(url, width=0, height=0){
	if(width > 0 && height > 0) {
		// console.log("根据宽高裁剪");
		//return picBase+url+'?x-oss-process=image/resize,m_fill,h_'+height+',w_'+width;
		return url+'?x-oss-process=image/resize,m_fill,h_'+height+',w_'+width;
	}else if(width == 0 && height > 0){
		// console.log("根据高度等比缩放");
		//return picBase+url+'?x-oss-process=image/resize,h_'+height+',m_lfit';
		return url+'?x-oss-process=image/resize,h_'+height+',m_lfit';
	}else {
		//return  picBase+url;
		return  url;
	}	
}